package server;

import java.util.ArrayList;

public enum IntelServerType {
   EXTERNAL_SERVER("External Server"), JETTY_SERVER("Embedded Jetty");

   public static IntelServerType fromString(final String string) {
	  for (IntelServerType ist : values()) {
		 if (string.equals(ist.stringRep))
			return ist;
	  }
	  throw new IllegalArgumentException();
   }

   public static Object[] toStringList() {
	  ArrayList<String> out = new ArrayList<String>();
	  for (IntelServerType ist : values()) {
		 out.add(ist.toString());
	  }
	  return out.toArray();
   }

   private String stringRep;

   private IntelServerType(final String stringRep) {
	  this.stringRep = stringRep;
   }

   @Override
   public String toString() {
	  return stringRep;
   }
}
